<?php
namespace Api\Controller;
use Common\Model\MongoDBModel;
use Think\Controller;
class TestController extends Controller\RestController{

        public function index() {

            header("Access-Control-Allow-Origin:*");
            header('Access-Control-Allow-Headers: X-Requested-With,SIGN');

            //var_dump(D("customer")->select());
            //$M= new MongoDBModel('movie');//movie是集合名（表名）

            //print_r($M->where(array("a"=>"1"))->select());


            //print_r($M->where(array('_id'=>1))->field("a")->select());

            $data["create_time"] = getCurrentDate();
            $data["nickname"] = $_REQUEST["nickname"];

            D("Count")->add($data);

            $this->response($data, 'json');

        }

}